#!/bin/sh
#generic application launcher

[ ! "$DISPLAY" ] && exit

# generic
which gexec &>/dev/null && exec gexec
which gmrun &>/dev/null && exec gmrun

# lxde
pidof lxpanel &>/dev/null && exec lxpanelctl run
pidof lxpanelx &>/dev/null && exec lxpanelxctl run

# xfce
which xfce4-appfinder &>/dev/null && exec xfce4-appfinder

# kde
which krunner &>/dev/null && exec krunner

# yad 
if which yad  &>/dev/null ; then
	exe=$(yad --center --title "Run" --entry --window-icon=/usr/share/pixmaps/puppy/execute.svg)
	[ "$exe" ] && exec $exe
fi

# gtkdialog
which prun &>/dev/null && exec prun # this app is heavy

# etc
which lxterminal &>/dev/null && exec lxterminal
exec xterm 

### END ###
